<!--// Call skin tour in element-->
<?php
echo $this->element('skin_tour');
?>
<?php echo $this->Html->script(array('jquery-1.11.2.min'));?>
<!--//content-->

<div class="col-xs-12 col-sm-9 col-md-9 col-lg-9">
    <div class="row clearfix">
        <div class="container">

        </div>
        <div class="col-xs-12 col-sm-12 col-md-12 col-lg-12">
            <div class="clearfix" id="high-light-tour">
                <?php
                echo $this->element('high_light_tour');
                ?>
            </div>
            <script type="text/javascript">
                function pagingnomarljax($pagenum){
                    var url = '<?php echo "http://" . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI']; ?>'+'Mypages/normaltour/page:'+$pagenum;
                    $.ajax({
                        url: url,
                        success: function(output) {
                            $('#normal-tour').html(output);
                        },
                        error: function(){
                            alert("ERROR");
                        }
                    })
                }
                function paginghighlightajax($pagenum){
                    var url = '<?php echo "http://" . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI']; ?>'+'Mypages/highlighttour/page:'+$pagenum;
                    $.ajax({
                        url: url,
                        success: function(output) {
                            $('#high-light-tour').html(output);
                        },
                        error: function(){
                            alert("ERROR");
                        }
                    })
                }
            </script>
            <div class="text-right clearfix">
                <ul class="pagination">
                    <li>
                            <span aria-hidden="true">&laquo;</span>
                    </li>
                <?php
                $pages = ceil($highlightTourNum/8);
                $paginationhighlightStr = '';
                if($pages > 1)
                {
                    $paginationhighlightStr .= '';
                    for($i = 1; $i<=$pages; $i++)
                    {
                        $paginationhighlightStr .= '<li onclick="paginghighlightajax('.$i.')"><a>'.$i.'</a></li>';
                    }
                    $paginationhighlightStr .= '';
                }
                echo $paginationhighlightStr;
                ?>
                    <li>
                            <span aria-hidden="true">&raquo;</span>
                    </li>
                </ul>
            </div>
            <div class="clearfix" id="normal-tour">
                <?php
                    echo $this->element('normal_tour');
                ?>
            </div>
            <div class="text-right clearfix">
                <ul class="pagination">
                    <li>
                            <span aria-hidden="true" onclick="pagingnomarljax(1)">&laquo;</span>
                    </li>
                <?php
                $pages = ceil($normalTourNum/8);
                $paginationnormalStr = '';

                if($pages > 1)
                {
                    $paginationnormalStr .= '';
                    for($i = 1; $i<=$pages; $i++)
                    {
                        $paginationnormalStr .= '<li onclick="pagingnomarljax('.$i.')"><a>'.$i.'</a></li>';
                    }
                    $paginationnormalStr .= '';
                }
                echo $paginationnormalStr;
                ?>
                    <li>
                            <span aria-hidden="true" onclick="pagingnomarljax(2)">&raquo;</span>
                    </li>
                </ul>
            </div>
            <div class="TTDL clearfix">
                <h3>
                    <?php echo $this->Html->image('img-h3-03.jpg',array('class'=>'img-responsive')); ?>
                </h3>
                <?php foreach($articalTitle as $articalTitleElement) {?>
                    <div class="col-xs-12 col-sm-4 col-md-4 col-lg-4 col-pt-2 list-know">
                        <h4 class="color-red"><?php echo $articalTitleElement['CateArtical']['title']?></h4>
                        <ul class="list-unstyled">
                            <?php
                            $article = $articalTitleElement['Artical'];
                            foreach($article as $articleElement) {?>
                                <li>
                                    <a href="#" class="color-black font-weight">
                                        <span class="glyphicon glyphicon-minus" aria-hidden="true"></span>
                                        <?php echo $articleElement['title'];?>
                                    </a>
                                </li>
                            <?php }?>
                        </ul>
                    </div>
                <?php }?>
            </div>
        </div>
    </div>
</div>





